
<ul class="maintabmenu multipletabmenu">
    <li class="current"><a href="<?php echo base_url(); ?>administrator/fields"><span>Danh sách lĩnh vưc</span></a></li>
    <li><a href="<?php echo base_url(); ?>administrator/fields/create"><span>Thêm lĩnh vực</span></a></li>
</ul>
<div class="content">
    <div class="contenttitle radiusbottom0">
        <h2 class="table"><span>Danh sách lĩnh vực</span></h2>
    </div>
    <div class="tableoptions">
        <button title="table2" class="deletebutton radius3" value="<?php echo base_url(); ?>administrator/fields/delete">Delete Selected</button>
    </div>
    <table cellspacing="0" cellpadding="0" border="0" class="stdtable stdtablecb" id="table2">
        <colgroup>
            <col class="con0">
            <col class="con1">
            <col class="con0">
            <col class="con1">
            <col class="con0">
            <col class="con1">
            <col class="con0">
        </colgroup>
        <thead>
            <tr>
                <th class="head0"><span class="checkbox"><input type="checkbox" class="checkall"></span></th>
                <th class="head1">Lĩnh vực</th>
                <th class="head0">Mô tả</th>                
                <th class="head1">Ngày tạo</th>                
                <th class="head0">&nbsp;</th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <th class="head0"><span class="checkbox"><input type="checkbox" class="checkall"></span></th>
                <th class="head1">Lĩnh vực</th>
                <th class="head0">Mô tả</th>                
                <th class="head1">Ngày tạo</th>                
                <th class="head0">&nbsp;</th>
            </tr>
        </tfoot>
        <tbody>
            <?php foreach ($list_fields as $field) { ?>
                <tr>
                    <td class="center"><span class="checkbox"><input type="checkbox" value="<?php echo $field->id; ?>"></span></td>
                    <td><?php echo $field->name; ?></td>
                    <td><?php echo $field->description; ?></td>                
                    <td class="center"><?php $date = new DateTime($field->date);
            echo $date->format('d-m-Y');
                ?></td>                
                    <td class="center"><a class="edit" href="<?php echo base_url(); ?>administrator/fields/edit/<?php echo $field->id; ?>">Sửa</a> &nbsp; <a class="delete" href="<?php echo base_url(); ?>administrator/fields/delete" id="<?php echo $field->id; ?>" >Xóa</a></td>
                </tr>
<?php } ?>
        </tbody>
    </table>
<?php echo $list_link; ?>
</div>
